<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
</head>
<body>
    <div id="app">
        <h1>遍历数组</h1>
        <ul>
            <li v-for="item,index in arr">item 是{{item}}，index是{{index}}</li>
        </ul>

        <h1>遍历对象</h1>
        <ul>
            <li v-for="value,key,index in obj" >
                对象的value是  {{value}} ,
                对象的key是 {{key}},
                对象的index是{{index}},
            </li>
        </ul>
    </div>


    <script>
        const app = Vue.createApp({
            data(){
                return{
                    arr:[4,3,2,1,0],
                    obj:{
                        a:1,
                        b:2,
                        c:3,
                        d:4
                    
                    }
                }
            },
            methods:{
              
            }
        })
        app.mount("#app")
    </script>
</body>
</html>